# begin
#   require File.dirname(__FILE__) + '/../../../../spec/spec_helper'
# rescue LoadError
#   puts "You need to install rspec in your base app"
#   exit
# end
# 
# plugin_spec_dir = File.dirname(__FILE__)
# ActiveRecord::Base.logger = Logger.new(plugin_spec_dir + "/debug.log")

$:.unshift(File.dirname(__FILE__) + '/../lib')

require 'rubygems'
require 'bundler/setup'
require 'spec'
require 'logger'

require 'active_record'

require 'i_helpers'

plugin_spec_dir = File.dirname(__FILE__)
ActiveRecord::Base.establish_connection(:adapter => 'sqlite3', :database => ':memory:')
ActiveRecord::Base.logger = Logger.new(plugin_spec_dir + "/debug.log")
ActiveRecord::Migration.verbose = false

ActiveSupport::Dependencies.autoload_paths << File.dirname(__FILE__)